﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/MainTemplate.Master" AutoEventWireup="true" CodeBehind="AllDraftsForReview.aspx.cs" Inherits="AlexandriaPressWebsite.MasterPages.WebForm4" %>
<asp:Content ID="Content1" ContentPlaceHolderID="mainDoc" runat="server">
    <h1>Unassigned Drafts</h1>
    <asp:ScriptManager ID="ScriptManagerForGridView" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel" runat="server">
            <ContentTemplate>
                <asp:GridView ID="DraftsGridView" runat="server" 
                    AllowPaging="True" OnPageIndexChanging="DraftsGridView_OnPageIndexChanging" PageSize="30" AutoGenerateColumns="False" BorderStyle="None" RowStyle-BorderStyle="None" PagerSettings-PageButtonCount="30" GridLines="None" CssClass="grid" PagerStyle-CssClass="pager" AlternatingRowStyle-CssClass="alterRow">
                    <PagerSettings PageButtonCount="30" />
                    <RowStyle BorderStyle="None" />
                    <Columns>
                        <asp:BoundField DataField="DraftID" HeaderText="Draft ID No." />
                        <asp:BoundField DataField="WorkingTitle" HeaderText="Working Title" />
                        <asp:BoundField DataField="Genre" HeaderText="Genre" />
                        <asp:BoundField DataField="DateSubmitted" 
                            HeaderText="Date Submitted by Author" />
                        <asp:TemplateField HeaderText="Select One">
                            <ItemTemplate>
                              <input name="RadioButton" type="radio" 
                                        value='<%# Eval("DraftID") %>' />
                            </ItemTemplate>                   
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
            </Triggers>    
    </asp:UpdatePanel>
    <asp:Timer ID="Timer1" runat="server" Interval="60000" ontick="Timer1_Tick">
    </asp:Timer>
    <asp:Button ID="SubmitButton" runat="server" Text="Download Selected Draft" 
        onclick="SubmitButton_Click" CssClass="genericButton" />
    <asp:Button ID="CancelButton" runat="server" Text="Go Back to Main Page" 
        CssClass="genericButton" onclick="CancelButton_Click" />    
    <br/>    
    <br/>
    <p>To assign yourself a draft to review, please select the radio box beside the draft entry and click the "Download Selected Draft" button.</p>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="formDoc" runat="server">
</asp:Content>
